<?php
/**
 * Created by paperphp
 * User: 22071
 * Date: 2019/6/19
 * Email: <zhendongdong@foxmail.com>
 */

namespace paper\exception;


use JetBrains\PhpStorm\Pure;
use Throwable;

class DbException extends BaseException
{
    private string $errorSql = '';
    private array $bindData = [];
    #[Pure]
    public function __construct($message = "", $code = 0, Throwable $previous = null)
    {
        parent::__construct($message, $code, $previous);
    }



    /**
     * @param array $bindData
     */
    public function setBindData(array $bindData): void
    {
        $this->bindData = $bindData;
    }

    /**
     * @return array
     */
    public function getBindData(): array
    {
        return $this->bindData;
    }

    public function setSql($sql){
        $this->errorSql = $sql;
    }

    public function getSql(): string
    {
        return $this->errorSql;
    }
}